Prompting Is Programming: A Query Language for Large Language Models
نویسندگان
چکیده
Large language models have demonstrated outstanding performance on a wide range of tasks such as question answering and code generation. On high level, given an input, model can be used to automatically complete the sequence in statistically-likely way. Based this, users prompt these with instructions or examples, implement variety downstream tasks. Advanced prompting methods even imply interaction between model, user, external tools calculators. However, obtain state-of-the-art adapt for specific tasks, complex task- model-specific programs implemented, which may still require ad-hoc interaction. we present novel idea Language Model Programming (LMP). LMP generalizes from pure text prompts intuitive combination scripting. Additionally, allows constraints specified over output. This enables easy adaption many while abstracting internals providing high-level semantics. To enable LMP, LMQL(short Query Language), leverages control flow generate efficient inference procedure that minimizes number expensive calls underlying model. We show LMQL capture way, especially facilitating interactive flows are challenging existing APIs. Our evaluation shows retain increase accuracy several also significantly reducing required amount computation cost case pay-to-use APIs (26-85% savings).
منابع مشابه
A Graph Query Language for EMF Models
While model queries are important components in modeldriven tool chains, they are still frequently implemented using traditional programming languages, despite the availability of model query languages due to performance and expressiveness issues. In the current paper, we propose EMF-IncQuery as a novel, graph-based query language for EMF models by adapting the query language of the Viatra2 mod...
متن کاملubQL, a Language for Programming Distributed Query Systems
ubQL is a distributed query language for programming large-scale distributed query systems such as resource sharing systems. The language is obtained by adding a small set of mobile process primitives (communication channels, migration operators, etc.) on top of any additional query language. Queries are encapsulated into processes and can migrate between sites thus enabling cooperation. An imp...
متن کاملA Query Language for OWL based on Logic Programming
In this paper we investigate how to use logic programming (in particular, Prolog) as query language against OWL resources. Our query language will be able to retrieve data and meta-data about a given OWL based ontology. With this aim, firstly, we study how to define a query language based on a fragment of Description Logic, then we show how to encode the defined query language into Prolog by me...
متن کاملRequirements for Programming Language Memory Models
One of the goals of the designers of the Java programming language was that multithreaded programs written in Java would have consistent and well-defined behavior. This would allow Java programmers to understand how their programs might behave; it would also allow Java platform architects to develop their platforms in a flexible and efficient way, while still ensuring that Java programs ran on ...
متن کاملNatural Language Models for Predicting Programming Comments
Statistical language models have successfully been used to describe and analyze natural language documents. Recent work applying language models to programming languages is focused on the task of predicting code, while mainly ignoring the prediction of programmer comments. In this work, we predict comments from JAVA source files of open source projects, using topic models and n-grams, and we an...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2023
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3591300